home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 9
/
Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO
/
038a
/
multfax.zip
/
TRAPFAX.DOC
< prev
Wrap
Text File
|
1993-02-23
|
6KB
|
125 lines
This set of files was created to work with Quick Link II, but it should work
with any FAX receive program. If your FAX receive program cannot be removed
after the FAX is received (as Quick Link can) other DESQview windows will
remain halted until you return. But, at least, you got the FAX.
I'll refer to the DESQview window where you intend to receive faxes as the
TrapFax window.
* IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT *
You must configure the TrapFax window so it will NOT share the CPU with
other windows. 2nd page of the Change a Program configuration screens
(Advanced Options). The next to last entry on the bottom left. "Share CPU
when foreground ....: [N]" If you share time with other windows while
receiving a FAX, the FAX will fail. That's the reason for this file set.
Be sure TRAPFAX.BAT and all the files it runs, listed below, are in the same
directory. This is essential, double check to make sure.
The following 19 lines makeup TRAPFAX.BAT
1 :START
2 IF NOT EXIST GONEXT.EXE GOTO ErrorMessage
3 GONEXT
4 IF NOT EXIST CHK4RING.EXE GOTO ErrorMessage
5 CHK4RING com1 ps2n
6 IF errorlevel 50 GOTO END
7 IF NOT EXIST GOFRONT.EXE GOTO ErrorMessage
8 GOFRONT
9 IF NOT EXIST RECFAX.BAT GOTO ErrorMessage
10 CALL RECFAX
11 IF NOT EXIST KILLTIME.EXE GOTO ErrorMessage
12 KILLTIME 7
13 IF errorlevel 50 GOTO END
14 CALL RECFAX out
15 GOTO START
16 :ErrorMessage
17 @ECHO File Not Found! ^^^^^^
18 :END
19 GOFRONT
1 :START
A location label that marks the beginning of the batch file
2 IF NOT EXIST GONEXT.EXE GOTO ErrorMessage
This line checks for the GONEXT utility. If it is not found it goes to
line 16 which gives an error message and exits the batch file. Lines 4, 7,
9 and 11 do this same sort of thing.
3 GONEXT
A utility that puts you in some other DesqView window. If you remain in the
TrapFax window nothing else will operate, because it does not share the CPU
when in the foreground. It does share the CPU while running in the
background. This utility makes sure you don't forget and leave the TrapFax
window in the foreground after starting TRAPFAX.BAT. Also, it returns
TrapFax to the background after a FAX has been received and the cycle has
begun again.
5 CHK4RING com1 ps2n
This utility watches for the phone to ring. When it sees the phone ring it
exits, letting the batch file continue. This is the only line in the
TRAPFAX.BAT you may need to modify if you use Quick Link II. It requires 2
command line arguments. The first is the com port your modem is on stated
as COM1, etc. The 2nd indicates whether your computer is IBM PS2
micro-channel architecture. This is indicated by entering PS2N for no and
PS2Y for yes, it is a PS2. If you don't know, try PS2N.
6 IF errorlevel 50 GOTO END
This line will abort the batch file if you made an error when running the
previous utility, or if you abort CHK4RING or KILLTIME.
8 GOFRONT
This utility forces any DESQview window it's run in to the front
(foreground). In this case it forces the TrapFax window to the foreground.
Remember, you MUST configure your TrapFax window so it will not share the
CPU when it is in the foreground.
10 CALL RECFAX
RECFAX is a batch file that comes with Quick Link II. It loads the receive-
a-fax TSR. If you are using a version of DOS earlier than 3.3 you do not
have the CALL command. You will have to put the contents of RECFAX.BAT
directly in TRAPFAX.BAT in place of the CALL RECFAX line.
12 KILLTIME 7
This utility waits for the number of seconds indicated in the command line
argument. In this case 7 seconds. This wait is necessary to give the
receive-a-fax TSR time to realize the phone is ringing, emerge (become
active) and answer the phone. Once the TSR emerges, KILLTIME is suspended.
It takes more than 7 seconds for the receive-a-fax process; so, when the TSR
finishes and withdraws, KILLTIME sees that more than 7 seconds have elapsed
and ends immediately. NOTE: If a caller hangs up after the second ring,
and before the TSR answers, it will wait forever to answer. It's rare, but
if it happens, it ties up the machine until you return, or until another
call comes in.
13 IF errorlevel 50 GOTO END
See line 6.
14 CALL RECFAX out
This runs the Quick Link II batch file with the "out" argument, to remove
the receive FAX TSR from memory. See the explanation for line 10 if your
version of DOS is earlier than 3.3.
15 GOTO START
This line loops back to the beginning (START:) of the batch file and starts
the process all over again. This creates an endless loop that resets
everything back to the way it was before the phone rang. The system is
ready to receive the next FAX, and the other windows are running (multi-
tasking). Pressing Esc will abort CHK4RING or KILLTIME, and exit
TRAPFAX.BAT. You can also stop the process by closing the TrapFax window,
or pressing Control-C or Control-Break repeatedly.
16 :ErrorMessage
17 @ECHO File Not Found! ^^^^^^
Displays this error message if the IF test in line 2, 4, 7, 9 or 11 fails.
18 :END
Quits the batch file if CHK4RING or KILLTIME fails to run properly or either
is aborted. Also, if any of the required files are not found.
19 GOFRONT
Returns the TrapFax window to the foreground after a failure, so you can see
something's wrong.